/*
 * @Description: 能耗历史
 * @Date: 2023-11-16 09:18:11
 * @FilePath: \hksj-vued:\03code\hk-iot\src\api\configuration\server\index.ts
 */
import request from '/@/utils/request';
/**
 * @method deviceByArea 区域位置查询对应设备
 * @method analysisByDevice 查询图表数据
 * @method analysisByPaging 查询表格数据
 * @method analysisByExport 导出设备数据


 */
export function useHostoryApi() {
  return {
    deviceByArea: (params: object) => {
      return request({
        url: '/api/mqtt/device/queryDeviceByArea',
        method: 'POST',
        data: params,
      });
    },
    analysisByDevice: (params: object) => {
      return request({
        url: '/api/mqtt/dataAnalysis/queryDataAnalysisByDevice',
        method: 'POST',
        data: params,
      });
    },
    analysisByPaging: (params: object) => {
      return request({
        url: '/api/mqtt/dataAnalysis/queryDataAnalysisByPaging',
        method: 'POST',
        data: params,
      });
    },
    analysisByExport: (params: object) => {
      return request({
        url: '/api/mqtt/dataAnalysis/queryDataAnalysisByExport',
        method: 'POST',
        data: params,
        responseType: 'blob',
        headers: { staticResource: true },
      });
    },
  }
}